import {MC_MANAGE_AXIOS} from '@/api/axios'

// POST - 添加一条记录
export function saveApi(params) {
    return MC_MANAGE_AXIOS.post('/role/save', params, {headers: {'Content-Type': 'application/json'}})
}

// GET - 查询一条记录
export function getInfoApi(id) {
    return MC_MANAGE_AXIOS.get('/role/getInfo/' + id)
}

// POST - 分页查询记录
export function pageApi(params) {
    return MC_MANAGE_AXIOS.post('/role/page', params, {headers: {'Content-Type': 'application/json'}});
}

// POST - 修改一条记录
export function updateApi(params) {
    return MC_MANAGE_AXIOS.post('/role/update', params, {headers: {'Content-Type': 'application/json'}})
}

// POST - 删除一条记录
export function removeApi(id) {
    return MC_MANAGE_AXIOS.post('/role/remove/' + id)
}

// POST - 批量删除记录
export function removeBatchApi(ids) {
    return MC_MANAGE_AXIOS.post('/role/removeBatch?ids=' + ids)
}

// GET - 查询全部记录
export function listApi() {
    return MC_MANAGE_AXIOS.get('/role/list')
}
// POST - 获取我的权限
export function getPermissionsApi(id) {
    return MC_MANAGE_AXIOS.post('/role/getPermissions/' + id);
}
//修改权限
export function updatePermissionsApi(params){
    return MC_MANAGE_AXIOS.post('/role/updatePermissions',params,{
        headers:{'Content-Type': 'application/json'}});







}
//按名称搜索
export function pageLikeTitleApi(params){
    return MC_MANAGE_AXIOS.post('/role/pageLikeTitle',params,{
        headers:{'Content-Type': 'application/json'}});

}
